<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        // var arr=[10,20,60,30,40,50]
        // var max=0
        // for(var i=0;i<arr.length;i++)
        // {
        //     if(arr[i]>max)
        //     {
        //         max=arr[i]
        //     }
        // }
        var arr=[['a','b','c'],['d','e','f'],['g','h','i']];
        var res=[];
        for(var i=0;i<arr[0];++i)
        {
            res[i]=[];
            for(var j=0;j<arr.length;++j)
            {
                res[i][j]=arr[j][i];
            }
        }    
        console.log(arr);
        console.log(res);
    </script>
</body>
</html>